package ua.kiev.tosik.price.database.dao;

import ua.kiev.tosik.price.database.RowSort;
import ua.kiev.tosik.price.models.Clients;
import ua.kiev.tosik.price.models.Prices;

import java.sql.Connection;
import java.util.Date;
import java.util.List;

public interface IPricesDao {

	public Connection getConn();

	public int countAll();

	public List<Prices> findAll();
	public List<Prices> findByAny(Prices prices);
	public Prices findById(int id);
	public List<Prices> findByDate(Date priceDate);
	public List<Prices> findByClientsId(Clients client);
	public List<Prices> findByNameAndArticle(String searchString);

	public Prices save(Prices prices) throws Exception;
	public void saveBatch(String fileName) throws Exception;
	public void deleteByPricesFilesId(int pricesFilesId) throws Exception;

	public int getOffset();
	public void setOffset(int offset);
	public int getLimiter();
	public void setLimiter(int limiter);
	public void setRowSorter(RowSort rowSort);

	public int getRecordCount();

}
